<%@ page contentType="text/html;charset=UTF-8" %>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="stmain"/>
    <title>SimTester - Register User</title>
  </head>
  <body>
    <h2>Create your account</h2>
    <g:form name="registerform" controller="user" action="register">
      <div>
        <g:eachError bean="${user}">
          <p class="error"><g:message error="${it}"/></p>
        </g:eachError>
        <g:if test="${flash.error}">
          <p class="error"><g:message code="${flash.error}"/></p>
        </g:if>
      </div>
      <div>
        <label>Username</label><br/>
        <input type="text" name="username"/>
      </div>
      <div>
        <label>Password</label><br/>
        <input type="password" name="password"/>
      </div>
      <div>
        <label>Password confirmation</label><br/>
        <input type="password" name="password_confirmation"/>
      </div>
      <div>
        <label>Team</label><br/>
        <g:select name="team" from="${teams}" value="Unassigned"/>
      </div>
      <div>
        <input class="button orange large" name="register" type="submit" value="Register"/>
      </div>
    </g:form>
  </body>
</html>